-- background: 2765 from stack: in.8 -- bmap block id: 4019 -- flags: 0000 -- background id: 0 -- name: almanac ----- HyperTalk script ----- on openCard global force,total,dec,dra,decra,fac,h,m,mode,t put line 1 of cd fld "Coords" of cd origin into lat ST put line 2 of fld UT into oldUT UT if total then get char 30 to 33 of line 3 of cd fld "totalOcc" of cd "Moon" if it is empty then set textstyle of fld pct to bold,italic else set textstyle of fld pct to bold put char 1 to 3 of it &"%"& last char of it into fld pct end if end if JD set numberFormat to "0.#######" if the shiftKey is up then get the number of this cd -- change 10 to 11 for Neptune if it>1 and it<11 then calc (the number of words of fld "ra cheb"),force end if end if if the short name of this cd is "Moon" or the short name of this cd is "Jupiter" then put nDate(1,12,0) &&"(JT)" into fld "date" if the short name of this cd is "Moon" then if total then send mouseUp to cd btn "Today" end if else send JFetch to cd Jupiter end if else put nDate(0,0,0) into fld "date" end if if short name of this cd is "Moon" and (the date ≠ line 6 of fld rise or force) then -- moon calcs from A.A. put the date into line 6 of fld rise put trunc(the seconds/86400)+(line 4 of fld "Rise")/24 + 2416480.5 + DSTcheck()/24 into JDr put (JDr-2451545)/36525 into t moonpos get -sind(lat)*sind(dec)/cosd(lat)/cosd(dec) put atan(sqrt(1-it*it)/it) into ang put dec>0 into d1 put lat>0 into d2 if d1 is d2 then add pi to ang end if put ang/fac/15 into delta put dra/15+line 2 of fld UT-line 2 of fld ST+24-DSTcheck()into arg get (arg-delta) mod 24 put arg into line 3 of fld rise put it into line 4 of fld rise hm false,it ampm put short name of this cd && "Rises at "& h &":" & m && mode into line 1 of fld rise put trunc(the seconds/86400)+(line 5 of fld "Rise")/24 + 2416480.5 + DSTcheck()/24 into JDs put (JDs-2451545)/36525 into t moonpos get -sind(lat)*sind(dec)/cosd(lat)/cosd(dec) put atan(sqrt(1-it*it)/it) into ang put dec>0 into d1 put lat>0 into d2 if d1 is d2 then add pi to ang end if put ang/fac/15 into delta put dra/15+line 2 of fld UT-line 2 of fld ST+24-DSTcheck()into arg get (arg+delta) mod 24 put it into line 5 of fld rise hm false,it ampm put short name of this cd && "Sets at "& h &":" & m && mode into line 2 of fld rise end if end openCard on JD set numberFormat to "0.###" put "Julian Date = " & the seconds/86400 + 2416480.5 + DSTcheck()/24 into fld "JD" end JD on effect visual effect wipe left very fast end effect -- three scripts below are for adding new year stuff on dc global fieldName,n repeat with i=1 to n if "." is not in word i of fld fieldName then put i&&word i of fld fieldName exit repeat end if end repeat end dc on NeuJahr global fieldName,n put 0 into i Answer "Field" with "RA Cheb" or "Dec Cheb" put it into fieldName put fieldName put empty into fld fieldName repeat add 1 to i Ask "Enter Term"&&i if it is empty then put i-1 into n exit repeat end if put it&" " into word i of fld fieldName end repeat addit end NeuJahr on addit Answer "Field" with "RA Cheb" or "Dec Cheb" put it into fieldName put 0 into sum set numberFormat to "0.000000000" repeat with i=1 to number of words of fld FieldName add word i of fld fieldName to sum end repeat put sum end addit -- part 1 (button) -- low flags: 00 -- high flags: C006 -- rect: left=354 top=281 right=303 bottom=398 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: DST ----- HyperTalk script ----- on mouseUp set hilite of me to not hilite of me end mouseUp -- part 4 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=432 top=50 right=92 bottom=471 -- title width / last selected line: 0 -- icon id / first selected line: 20098 / 20098 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Home ----- HyperTalk script ----- on mouseUp effect go home end mouseUp -- part 5 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=432 top=91 right=121 bottom=471 -- title width / last selected line: 0 -- icon id / first selected line: 16732 / 16732 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: ----- HyperTalk script ----- on mouseUp effect push card go card "fx" end mouseUp -- part 6 (field) -- low flags: 00 -- high flags: 0000 -- rect: left=190 top=283 right=301 bottom=349 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: UT -- part 7 (field) -- low flags: 00 -- high flags: 0000 -- rect: left=38 top=283 right=301 bottom=186 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: ST -- part 8 (field) -- low flags: 81 -- high flags: 4001 -- rect: left=0 top=171 right=236 bottom=512 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 15026 -- text size: 10 -- style flags: 0 -- line height: 13 -- part name: RA Cheb -- part 9 (field) -- low flags: 81 -- high flags: 4001 -- rect: left=0 top=275 right=342 bottom=511 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 15026 -- text size: 10 -- style flags: 0 -- line height: 13 -- part name: dec Cheb -- part 10 (field) -- low flags: 00 -- high flags: 0000 -- rect: left=181 top=75 right=141 bottom=363 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Pos -- part 13 (field) -- low flags: 00 -- high flags: 0000 -- rect: left=181 top=140 right=175 bottom=363 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: rise -- part 14 (field) -- low flags: 00 -- high flags: 0000 -- rect: left=41 top=81 right=106 bottom=170 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 14991 -- text size: 18 -- style flags: 0 -- line height: 24 -- part name: Planet -- part 17 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=398 top=50 right=83 bottom=433 -- title width / last selected line: 0 -- icon id / first selected line: 100 / 100 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Sun ----- HyperTalk script ----- on mouseUp effect go card "Sun" end mouseUp -- part 18 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=398 top=82 right=115 bottom=433 -- title width / last selected line: 0 -- icon id / first selected line: 101 / 101 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: ----- HyperTalk script ----- on mouseUp effect go card "Mercury" end mouseUp -- part 19 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=398 top=114 right=147 bottom=433 -- title width / last selected line: 0 -- icon id / first selected line: 102 / 102 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: ----- HyperTalk script ----- on mouseUp effect go card "Venus" end mouseUp -- part 20 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=398 top=146 right=179 bottom=433 -- title width / last selected line: 0 -- icon id / first selected line: 104 / 104 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: ----- HyperTalk script ----- on mouseUp effect go card "Mars" end mouseUp -- part 21 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=398 top=178 right=211 bottom=433 -- title width / last selected line: 0 -- icon id / first selected line: 105 / 105 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: ----- HyperTalk script ----- on mouseUp effect go card "Jupiter" end mouseUp -- part 22 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=398 top=210 right=243 bottom=433 -- title width / last selected line: 0 -- icon id / first selected line: 106 / 106 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: ----- HyperTalk script ----- on mouseUp effect go card "Saturn" end mouseUp -- part 23 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=398 top=242 right=275 bottom=433 -- title width / last selected line: 0 -- icon id / first selected line: 107 / 107 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: ----- HyperTalk script ----- on mouseUp effect go card "Uranus" end mouseUp -- part 24 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=398 top=274 right=304 bottom=433 -- title width / last selected line: 0 -- icon id / first selected line: 108 / 108 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: ----- HyperTalk script ----- on mouseUp effect go card "Neptune" end mouseUp -- part 27 (button) -- low flags: 00 -- high flags: 0004 -- rect: left=231 top=306 right=340 bottom=276 -- title width / last selected line: 0 -- icon id / first selected line: 5472 / 5472 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: New Button ----- HyperTalk script ----- on mouseUp go first card end mouseUp -- part 28 (field) -- low flags: 00 -- high flags: 0000 -- rect: left=39 top=25 right=44 bottom=217 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 256 -- line height: 16 -- part name: Date -- part 31 (field) -- low flags: 00 -- high flags: 0000 -- rect: left=266 top=25 right=44 bottom=469 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 256 -- line height: 16 -- part name: JD -- part 35 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=358 top=50 right=85 bottom=399 -- title width / last selected line: 0 -- icon id / first selected line: 30979 / 30979 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Moon ----- HyperTalk script ----- on mouseUp effect go to card id 7837 end mouseUp -- part 36 (button) -- low flags: 00 -- high flags: 0002 -- rect: left=475 top=50 right=80 bottom=508 -- title width / last selected line: 0 -- icon id / first selected line: 2478 / 2478 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: ----- HyperTalk script ----- on mouseUp push card go first card of bkgnd "Info" end mouseUp -- part 39 (field) -- low flags: 00 -- high flags: 0000 -- rect: left=216 top=25 right=44 bottom=266 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 256 -- line height: 16 -- part name: Pct -- part 40 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=432 top=120 right=157 bottom=471 -- title width / last selected line: 0 -- icon id / first selected line: 26516 / 26516 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Conj ----- HyperTalk script ----- on mouseUp push cd go cd conjunct end mouseUp -- part 41 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=432 top=156 right=191 bottom=471 -- title width / last selected line: 0 -- icon id / first selected line: 28557 / 28557 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: topo ----- HyperTalk script ----- on mouseUp pop cd go position end mouseUp -- part 42 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=432 top=190 right=226 bottom=471 -- title width / last selected line: 0 -- icon id / first selected line: 4450 / 4450 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: meteor ----- HyperTalk script ----- on mouseUp go cd meteor mcalc end mouseUp -- part 43 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=432 top=225 right=259 bottom=470 -- title width / last selected line: 0 -- icon id / first selected line: 17699 / 17699 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: ad-aa ----- HyperTalk script ----- on mouseUp go to card id 11225 end mouseUp